<?php
session_start();
if (isset($_POST["login"])) {
	
if (($_POST["login"]=="setroma") && ($_POST["password"]=="admin")) {
	$_SESSION['status'] = "logged";
	header("location: stanze/"); 	
} else {
	?>
	<html>
	<head>
	<link rel='stylesheet' type='text/css' href='styles/style.css' />
	</head>
	<body>
	<h1>Login Errato</h1>
	<a href="javascript:history.back()">Torna alla schermata di login</a>
	</body>
	</html>	
	<?php
}
	
} else {
?>	
<html>
<head>
<link rel='stylesheet' type='text/css' href='styles/style.css' />
</head>
<body>
<h1>SiteRoom- Login Amministratore</h1>
<form method=post>
UserName: <input type=text name=login><br>
Password: <input type=password name=password><br>
<input type=submit value=Login>
</form>
</body>
</html>
<?php	
}
?>
